package ar.edu.caece.compiler.grammar.nonterminals;

import static org.apache.commons.logging.LogFactory.getLog;

import org.apache.commons.logging.Log;

import ar.edu.caece.compiler.model.Grammar;


public class NonTerminalLogger {
	
	private Log logger = getLog(Grammar.class);	
	
	public NonTerminalLogger() {
		
		StringBuilder logLine = new StringBuilder();
		
		logLine.append("Instanciando nuevo no terminal: " + this.getClass().getSimpleName() + " -> ");
		
		for(Class<?> parameterTypes : this.getClass().getConstructors()[0].getParameterTypes()) {
				logLine.append(parameterTypes.getSimpleName() + " ");
		}
		
		logger.debug(logLine);
	}
}
